﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Hangout_Client_Core_Converters="clr-namespace:Hangout.Client.Core.Converters" xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="Hangout.Client.Controls.Notifications.NotificationList"
    mc:Ignorable="d"
    
    d:DesignHeight="480" d:DesignWidth="480" Loaded="UserControl_Loaded" Height="650">
    
	<UserControl.Resources>

        <Hangout_Client_Core_Converters:DateTimeToStringConverter x:Key="DateTimeConverter"/>

        <DataTemplate x:Key="DashboardListboxItemTemplate">
			<StackPanel Width="480" Orientation="Horizontal" Margin="0,10,0,0" >
				<Image Height="48" Width="48" Source="appbar.transport.play.rest.png" Stretch="UniformToFill" Margin="7,0,0,0" VerticalAlignment="Top"/>
				<StackPanel Margin="0">
					<TextBlock TextWrapping="Wrap" FontSize="21.333" Width="418" Text="{Binding Text}" FontFamily="Segoe WP Light" d:LayoutOverrides="Height" Margin="0,10,0,0" />
					<TextBlock TextWrapping="Wrap" FontSize="17.333" Width="418" FontFamily="Segoe WP Light" d:LayoutOverrides="Height" Text="{Binding DatetimePosted,Converter={StaticResource DateTimeConverter}}" TextAlignment="Right" Foreground="#FFAFAFAF" />
				</StackPanel>
			</StackPanel>
		</DataTemplate>
	</UserControl.Resources>
	<UserControl.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</UserControl.FontFamily>
	<UserControl.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</UserControl.FontSize>
	<UserControl.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</UserControl.Foreground>
    
    <Grid x:Name="LayoutRoot">
    	<TextBlock x:Name="NoLBL" HorizontalAlignment="Right" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="Segoe WP Light" FontSize="25.333" Foreground="{StaticResource YellowBrush}" Width="464" Text="Its silent in here. You don't have any notifications yet." Margin="0,13,8,0" d:LayoutOverrides="VerticalMargin" Visibility="Collapsed"/>
    	<ScrollViewer x:Name="ItemList" VerticalAlignment="Top" Width="480" Height="650">
    		<StackPanel>
    			<ListBox  x:Name="NotificationsLB" Margin="0" ItemTemplate="{StaticResource DashboardListboxItemTemplate}" Width="480" HorizontalAlignment="Right" ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectionChanged="NotificationsLB_SelectionChanged">
    			</ListBox>
    			<ProgressBar x:Name="LoadingPG" Height="10" IsIndeterminate="True" Background="{StaticResource YellowBrush}" Foreground="{StaticResource YellowBrush}" Visibility="Collapsed" Width="480"/>
    		</StackPanel>
    	</ScrollViewer>

    </Grid>
</UserControl>
